/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3.impl;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.Enumerator;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.hl7.v3.ActRelationshipHasComponent;
import org.hl7.v3.BL1;
import org.hl7.v3.CS1;
import org.hl7.v3.II;
import org.hl7.v3.INT1;
import org.hl7.v3.POCDMT000040Act;
import org.hl7.v3.POCDMT000040Component4;
import org.hl7.v3.POCDMT000040Encounter;
import org.hl7.v3.POCDMT000040InfrastructureRootTypeId;
import org.hl7.v3.POCDMT000040Observation;
import org.hl7.v3.POCDMT000040ObservationMedia;
import org.hl7.v3.POCDMT000040Organizer;
import org.hl7.v3.POCDMT000040Procedure;
import org.hl7.v3.POCDMT000040RegionOfInterest;
import org.hl7.v3.POCDMT000040SubstanceAdministration;
import org.hl7.v3.POCDMT000040Supply;
import org.hl7.v3.V3Package;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>POCDMT000040 Component4</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getRealmCode <em>Realm Code</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getTypeId <em>Type Id</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getTemplateId <em>Template Id</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getSequenceNumber <em>Sequence Number</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getSeperatableInd <em>Seperatable Ind</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getAct <em>Act</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getEncounter <em>Encounter</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getObservation <em>Observation</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getObservationMedia <em>Observation Media</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getOrganizer <em>Organizer</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getProcedure <em>Procedure</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getRegionOfInterest <em>Region Of Interest</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getSubstanceAdministration <em>Substance Administration</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getSupply <em>Supply</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#isContextConductionInd <em>Context Conduction Ind</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getNullFlavor <em>Null Flavor</em>}</li>
 *   <li>{@link org.hl7.v3.impl.POCDMT000040Component4Impl#getTypeCode <em>Type Code</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class POCDMT000040Component4Impl extends EObjectImpl implements POCDMT000040Component4 {
	/**
	 * The cached value of the '{@link #getRealmCode() <em>Realm Code</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRealmCode()
	 * @generated
	 * @ordered
	 */
	protected EList<CS1> realmCode;

	/**
	 * The cached value of the '{@link #getTypeId() <em>Type Id</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTypeId()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040InfrastructureRootTypeId typeId;

	/**
	 * The cached value of the '{@link #getTemplateId() <em>Template Id</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTemplateId()
	 * @generated
	 * @ordered
	 */
	protected EList<II> templateId;

	/**
	 * The cached value of the '{@link #getSequenceNumber() <em>Sequence Number</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSequenceNumber()
	 * @generated
	 * @ordered
	 */
	protected INT1 sequenceNumber;

	/**
	 * The cached value of the '{@link #getSeperatableInd() <em>Seperatable Ind</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSeperatableInd()
	 * @generated
	 * @ordered
	 */
	protected BL1 seperatableInd;

	/**
	 * The cached value of the '{@link #getAct() <em>Act</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAct()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040Act act;

	/**
	 * The cached value of the '{@link #getEncounter() <em>Encounter</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getEncounter()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040Encounter encounter;

	/**
	 * The cached value of the '{@link #getObservation() <em>Observation</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getObservation()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040Observation observation;

	/**
	 * The cached value of the '{@link #getObservationMedia() <em>Observation Media</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getObservationMedia()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040ObservationMedia observationMedia;

	/**
	 * The cached value of the '{@link #getOrganizer() <em>Organizer</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getOrganizer()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040Organizer organizer;

	/**
	 * The cached value of the '{@link #getProcedure() <em>Procedure</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getProcedure()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040Procedure procedure;

	/**
	 * The cached value of the '{@link #getRegionOfInterest() <em>Region Of Interest</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRegionOfInterest()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040RegionOfInterest regionOfInterest;

	/**
	 * The cached value of the '{@link #getSubstanceAdministration() <em>Substance Administration</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSubstanceAdministration()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040SubstanceAdministration substanceAdministration;

	/**
	 * The cached value of the '{@link #getSupply() <em>Supply</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSupply()
	 * @generated
	 * @ordered
	 */
	protected POCDMT000040Supply supply;

	/**
	 * The default value of the '{@link #isContextConductionInd() <em>Context Conduction Ind</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isContextConductionInd()
	 * @generated
	 * @ordered
	 */
	protected static final boolean CONTEXT_CONDUCTION_IND_EDEFAULT = true;

	/**
	 * The cached value of the '{@link #isContextConductionInd() <em>Context Conduction Ind</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isContextConductionInd()
	 * @generated
	 * @ordered
	 */
	protected boolean contextConductionInd = CONTEXT_CONDUCTION_IND_EDEFAULT;

	/**
	 * This is true if the Context Conduction Ind attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean contextConductionIndESet;

	/**
	 * The default value of the '{@link #getNullFlavor() <em>Null Flavor</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNullFlavor()
	 * @generated
	 * @ordered
	 */
	protected static final Enumerator NULL_FLAVOR_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getNullFlavor() <em>Null Flavor</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getNullFlavor()
	 * @generated
	 * @ordered
	 */
	protected Enumerator nullFlavor = NULL_FLAVOR_EDEFAULT;

	/**
	 * The default value of the '{@link #getTypeCode() <em>Type Code</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTypeCode()
	 * @generated
	 * @ordered
	 */
	protected static final ActRelationshipHasComponent TYPE_CODE_EDEFAULT = ActRelationshipHasComponent.COMP;

	/**
	 * The cached value of the '{@link #getTypeCode() <em>Type Code</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getTypeCode()
	 * @generated
	 * @ordered
	 */
	protected ActRelationshipHasComponent typeCode = TYPE_CODE_EDEFAULT;

	/**
	 * This is true if the Type Code attribute has been set.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 * @ordered
	 */
	protected boolean typeCodeESet;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected POCDMT000040Component4Impl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return V3Package.eINSTANCE.getPOCDMT000040Component4();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<CS1> getRealmCode() {
		if (realmCode == null) {
			realmCode = new EObjectContainmentEList<CS1>(CS1.class, this, V3Package.POCDMT000040_COMPONENT4__REALM_CODE);
		}
		return realmCode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040InfrastructureRootTypeId getTypeId() {
		return typeId;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetTypeId(POCDMT000040InfrastructureRootTypeId newTypeId, NotificationChain msgs) {
		POCDMT000040InfrastructureRootTypeId oldTypeId = typeId;
		typeId = newTypeId;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__TYPE_ID, oldTypeId, newTypeId);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTypeId(POCDMT000040InfrastructureRootTypeId newTypeId) {
		if (newTypeId != typeId) {
			NotificationChain msgs = null;
			if (typeId != null)
				msgs = ((InternalEObject)typeId).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__TYPE_ID, null, msgs);
			if (newTypeId != null)
				msgs = ((InternalEObject)newTypeId).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__TYPE_ID, null, msgs);
			msgs = basicSetTypeId(newTypeId, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__TYPE_ID, newTypeId, newTypeId));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<II> getTemplateId() {
		if (templateId == null) {
			templateId = new EObjectContainmentEList<II>(II.class, this, V3Package.POCDMT000040_COMPONENT4__TEMPLATE_ID);
		}
		return templateId;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public INT1 getSequenceNumber() {
		return sequenceNumber;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetSequenceNumber(INT1 newSequenceNumber, NotificationChain msgs) {
		INT1 oldSequenceNumber = sequenceNumber;
		sequenceNumber = newSequenceNumber;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER, oldSequenceNumber, newSequenceNumber);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSequenceNumber(INT1 newSequenceNumber) {
		if (newSequenceNumber != sequenceNumber) {
			NotificationChain msgs = null;
			if (sequenceNumber != null)
				msgs = ((InternalEObject)sequenceNumber).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER, null, msgs);
			if (newSequenceNumber != null)
				msgs = ((InternalEObject)newSequenceNumber).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER, null, msgs);
			msgs = basicSetSequenceNumber(newSequenceNumber, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER, newSequenceNumber, newSequenceNumber));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public BL1 getSeperatableInd() {
		return seperatableInd;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetSeperatableInd(BL1 newSeperatableInd, NotificationChain msgs) {
		BL1 oldSeperatableInd = seperatableInd;
		seperatableInd = newSeperatableInd;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND, oldSeperatableInd, newSeperatableInd);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSeperatableInd(BL1 newSeperatableInd) {
		if (newSeperatableInd != seperatableInd) {
			NotificationChain msgs = null;
			if (seperatableInd != null)
				msgs = ((InternalEObject)seperatableInd).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND, null, msgs);
			if (newSeperatableInd != null)
				msgs = ((InternalEObject)newSeperatableInd).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND, null, msgs);
			msgs = basicSetSeperatableInd(newSeperatableInd, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND, newSeperatableInd, newSeperatableInd));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040Act getAct() {
		return act;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetAct(POCDMT000040Act newAct, NotificationChain msgs) {
		POCDMT000040Act oldAct = act;
		act = newAct;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__ACT, oldAct, newAct);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setAct(POCDMT000040Act newAct) {
		if (newAct != act) {
			NotificationChain msgs = null;
			if (act != null)
				msgs = ((InternalEObject)act).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__ACT, null, msgs);
			if (newAct != null)
				msgs = ((InternalEObject)newAct).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__ACT, null, msgs);
			msgs = basicSetAct(newAct, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__ACT, newAct, newAct));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040Encounter getEncounter() {
		return encounter;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetEncounter(POCDMT000040Encounter newEncounter, NotificationChain msgs) {
		POCDMT000040Encounter oldEncounter = encounter;
		encounter = newEncounter;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__ENCOUNTER, oldEncounter, newEncounter);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setEncounter(POCDMT000040Encounter newEncounter) {
		if (newEncounter != encounter) {
			NotificationChain msgs = null;
			if (encounter != null)
				msgs = ((InternalEObject)encounter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__ENCOUNTER, null, msgs);
			if (newEncounter != null)
				msgs = ((InternalEObject)newEncounter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__ENCOUNTER, null, msgs);
			msgs = basicSetEncounter(newEncounter, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__ENCOUNTER, newEncounter, newEncounter));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040Observation getObservation() {
		return observation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetObservation(POCDMT000040Observation newObservation, NotificationChain msgs) {
		POCDMT000040Observation oldObservation = observation;
		observation = newObservation;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__OBSERVATION, oldObservation, newObservation);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setObservation(POCDMT000040Observation newObservation) {
		if (newObservation != observation) {
			NotificationChain msgs = null;
			if (observation != null)
				msgs = ((InternalEObject)observation).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__OBSERVATION, null, msgs);
			if (newObservation != null)
				msgs = ((InternalEObject)newObservation).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__OBSERVATION, null, msgs);
			msgs = basicSetObservation(newObservation, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__OBSERVATION, newObservation, newObservation));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040ObservationMedia getObservationMedia() {
		return observationMedia;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetObservationMedia(POCDMT000040ObservationMedia newObservationMedia, NotificationChain msgs) {
		POCDMT000040ObservationMedia oldObservationMedia = observationMedia;
		observationMedia = newObservationMedia;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA, oldObservationMedia, newObservationMedia);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setObservationMedia(POCDMT000040ObservationMedia newObservationMedia) {
		if (newObservationMedia != observationMedia) {
			NotificationChain msgs = null;
			if (observationMedia != null)
				msgs = ((InternalEObject)observationMedia).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA, null, msgs);
			if (newObservationMedia != null)
				msgs = ((InternalEObject)newObservationMedia).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA, null, msgs);
			msgs = basicSetObservationMedia(newObservationMedia, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA, newObservationMedia, newObservationMedia));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040Organizer getOrganizer() {
		return organizer;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetOrganizer(POCDMT000040Organizer newOrganizer, NotificationChain msgs) {
		POCDMT000040Organizer oldOrganizer = organizer;
		organizer = newOrganizer;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__ORGANIZER, oldOrganizer, newOrganizer);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setOrganizer(POCDMT000040Organizer newOrganizer) {
		if (newOrganizer != organizer) {
			NotificationChain msgs = null;
			if (organizer != null)
				msgs = ((InternalEObject)organizer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__ORGANIZER, null, msgs);
			if (newOrganizer != null)
				msgs = ((InternalEObject)newOrganizer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__ORGANIZER, null, msgs);
			msgs = basicSetOrganizer(newOrganizer, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__ORGANIZER, newOrganizer, newOrganizer));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040Procedure getProcedure() {
		return procedure;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetProcedure(POCDMT000040Procedure newProcedure, NotificationChain msgs) {
		POCDMT000040Procedure oldProcedure = procedure;
		procedure = newProcedure;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__PROCEDURE, oldProcedure, newProcedure);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setProcedure(POCDMT000040Procedure newProcedure) {
		if (newProcedure != procedure) {
			NotificationChain msgs = null;
			if (procedure != null)
				msgs = ((InternalEObject)procedure).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__PROCEDURE, null, msgs);
			if (newProcedure != null)
				msgs = ((InternalEObject)newProcedure).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__PROCEDURE, null, msgs);
			msgs = basicSetProcedure(newProcedure, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__PROCEDURE, newProcedure, newProcedure));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040RegionOfInterest getRegionOfInterest() {
		return regionOfInterest;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetRegionOfInterest(POCDMT000040RegionOfInterest newRegionOfInterest, NotificationChain msgs) {
		POCDMT000040RegionOfInterest oldRegionOfInterest = regionOfInterest;
		regionOfInterest = newRegionOfInterest;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST, oldRegionOfInterest, newRegionOfInterest);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRegionOfInterest(POCDMT000040RegionOfInterest newRegionOfInterest) {
		if (newRegionOfInterest != regionOfInterest) {
			NotificationChain msgs = null;
			if (regionOfInterest != null)
				msgs = ((InternalEObject)regionOfInterest).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST, null, msgs);
			if (newRegionOfInterest != null)
				msgs = ((InternalEObject)newRegionOfInterest).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST, null, msgs);
			msgs = basicSetRegionOfInterest(newRegionOfInterest, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST, newRegionOfInterest, newRegionOfInterest));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040SubstanceAdministration getSubstanceAdministration() {
		return substanceAdministration;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetSubstanceAdministration(POCDMT000040SubstanceAdministration newSubstanceAdministration, NotificationChain msgs) {
		POCDMT000040SubstanceAdministration oldSubstanceAdministration = substanceAdministration;
		substanceAdministration = newSubstanceAdministration;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION, oldSubstanceAdministration, newSubstanceAdministration);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSubstanceAdministration(POCDMT000040SubstanceAdministration newSubstanceAdministration) {
		if (newSubstanceAdministration != substanceAdministration) {
			NotificationChain msgs = null;
			if (substanceAdministration != null)
				msgs = ((InternalEObject)substanceAdministration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION, null, msgs);
			if (newSubstanceAdministration != null)
				msgs = ((InternalEObject)newSubstanceAdministration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION, null, msgs);
			msgs = basicSetSubstanceAdministration(newSubstanceAdministration, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION, newSubstanceAdministration, newSubstanceAdministration));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public POCDMT000040Supply getSupply() {
		return supply;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetSupply(POCDMT000040Supply newSupply, NotificationChain msgs) {
		POCDMT000040Supply oldSupply = supply;
		supply = newSupply;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__SUPPLY, oldSupply, newSupply);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSupply(POCDMT000040Supply newSupply) {
		if (newSupply != supply) {
			NotificationChain msgs = null;
			if (supply != null)
				msgs = ((InternalEObject)supply).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__SUPPLY, null, msgs);
			if (newSupply != null)
				msgs = ((InternalEObject)newSupply).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - V3Package.POCDMT000040_COMPONENT4__SUPPLY, null, msgs);
			msgs = basicSetSupply(newSupply, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__SUPPLY, newSupply, newSupply));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isContextConductionInd() {
		return contextConductionInd;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setContextConductionInd(boolean newContextConductionInd) {
		boolean oldContextConductionInd = contextConductionInd;
		contextConductionInd = newContextConductionInd;
		boolean oldContextConductionIndESet = contextConductionIndESet;
		contextConductionIndESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__CONTEXT_CONDUCTION_IND, oldContextConductionInd, contextConductionInd, !oldContextConductionIndESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetContextConductionInd() {
		boolean oldContextConductionInd = contextConductionInd;
		boolean oldContextConductionIndESet = contextConductionIndESet;
		contextConductionInd = CONTEXT_CONDUCTION_IND_EDEFAULT;
		contextConductionIndESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, V3Package.POCDMT000040_COMPONENT4__CONTEXT_CONDUCTION_IND, oldContextConductionInd, CONTEXT_CONDUCTION_IND_EDEFAULT, oldContextConductionIndESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetContextConductionInd() {
		return contextConductionIndESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Enumerator getNullFlavor() {
		return nullFlavor;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setNullFlavor(Enumerator newNullFlavor) {
		Enumerator oldNullFlavor = nullFlavor;
		nullFlavor = newNullFlavor;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__NULL_FLAVOR, oldNullFlavor, nullFlavor));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActRelationshipHasComponent getTypeCode() {
		return typeCode;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setTypeCode(ActRelationshipHasComponent newTypeCode) {
		ActRelationshipHasComponent oldTypeCode = typeCode;
		typeCode = newTypeCode == null ? TYPE_CODE_EDEFAULT : newTypeCode;
		boolean oldTypeCodeESet = typeCodeESet;
		typeCodeESet = true;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, V3Package.POCDMT000040_COMPONENT4__TYPE_CODE, oldTypeCode, typeCode, !oldTypeCodeESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void unsetTypeCode() {
		ActRelationshipHasComponent oldTypeCode = typeCode;
		boolean oldTypeCodeESet = typeCodeESet;
		typeCode = TYPE_CODE_EDEFAULT;
		typeCodeESet = false;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.UNSET, V3Package.POCDMT000040_COMPONENT4__TYPE_CODE, oldTypeCode, TYPE_CODE_EDEFAULT, oldTypeCodeESet));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean isSetTypeCode() {
		return typeCodeESet;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case V3Package.POCDMT000040_COMPONENT4__REALM_CODE:
				return ((InternalEList<?>)getRealmCode()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_COMPONENT4__TYPE_ID:
				return basicSetTypeId(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__TEMPLATE_ID:
				return ((InternalEList<?>)getTemplateId()).basicRemove(otherEnd, msgs);
			case V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER:
				return basicSetSequenceNumber(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND:
				return basicSetSeperatableInd(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__ACT:
				return basicSetAct(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__ENCOUNTER:
				return basicSetEncounter(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION:
				return basicSetObservation(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA:
				return basicSetObservationMedia(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__ORGANIZER:
				return basicSetOrganizer(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__PROCEDURE:
				return basicSetProcedure(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST:
				return basicSetRegionOfInterest(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION:
				return basicSetSubstanceAdministration(null, msgs);
			case V3Package.POCDMT000040_COMPONENT4__SUPPLY:
				return basicSetSupply(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case V3Package.POCDMT000040_COMPONENT4__REALM_CODE:
				return getRealmCode();
			case V3Package.POCDMT000040_COMPONENT4__TYPE_ID:
				return getTypeId();
			case V3Package.POCDMT000040_COMPONENT4__TEMPLATE_ID:
				return getTemplateId();
			case V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER:
				return getSequenceNumber();
			case V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND:
				return getSeperatableInd();
			case V3Package.POCDMT000040_COMPONENT4__ACT:
				return getAct();
			case V3Package.POCDMT000040_COMPONENT4__ENCOUNTER:
				return getEncounter();
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION:
				return getObservation();
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA:
				return getObservationMedia();
			case V3Package.POCDMT000040_COMPONENT4__ORGANIZER:
				return getOrganizer();
			case V3Package.POCDMT000040_COMPONENT4__PROCEDURE:
				return getProcedure();
			case V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST:
				return getRegionOfInterest();
			case V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION:
				return getSubstanceAdministration();
			case V3Package.POCDMT000040_COMPONENT4__SUPPLY:
				return getSupply();
			case V3Package.POCDMT000040_COMPONENT4__CONTEXT_CONDUCTION_IND:
				return isContextConductionInd() ? Boolean.TRUE : Boolean.FALSE;
			case V3Package.POCDMT000040_COMPONENT4__NULL_FLAVOR:
				return getNullFlavor();
			case V3Package.POCDMT000040_COMPONENT4__TYPE_CODE:
				return getTypeCode();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case V3Package.POCDMT000040_COMPONENT4__REALM_CODE:
				getRealmCode().clear();
				getRealmCode().addAll((Collection<? extends CS1>)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__TYPE_ID:
				setTypeId((POCDMT000040InfrastructureRootTypeId)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__TEMPLATE_ID:
				getTemplateId().clear();
				getTemplateId().addAll((Collection<? extends II>)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER:
				setSequenceNumber((INT1)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND:
				setSeperatableInd((BL1)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__ACT:
				setAct((POCDMT000040Act)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__ENCOUNTER:
				setEncounter((POCDMT000040Encounter)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION:
				setObservation((POCDMT000040Observation)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA:
				setObservationMedia((POCDMT000040ObservationMedia)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__ORGANIZER:
				setOrganizer((POCDMT000040Organizer)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__PROCEDURE:
				setProcedure((POCDMT000040Procedure)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST:
				setRegionOfInterest((POCDMT000040RegionOfInterest)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION:
				setSubstanceAdministration((POCDMT000040SubstanceAdministration)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__SUPPLY:
				setSupply((POCDMT000040Supply)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__CONTEXT_CONDUCTION_IND:
				setContextConductionInd(((Boolean)newValue).booleanValue());
				return;
			case V3Package.POCDMT000040_COMPONENT4__NULL_FLAVOR:
				setNullFlavor((Enumerator)newValue);
				return;
			case V3Package.POCDMT000040_COMPONENT4__TYPE_CODE:
				setTypeCode((ActRelationshipHasComponent)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case V3Package.POCDMT000040_COMPONENT4__REALM_CODE:
				getRealmCode().clear();
				return;
			case V3Package.POCDMT000040_COMPONENT4__TYPE_ID:
				setTypeId((POCDMT000040InfrastructureRootTypeId)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__TEMPLATE_ID:
				getTemplateId().clear();
				return;
			case V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER:
				setSequenceNumber((INT1)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND:
				setSeperatableInd((BL1)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__ACT:
				setAct((POCDMT000040Act)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__ENCOUNTER:
				setEncounter((POCDMT000040Encounter)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION:
				setObservation((POCDMT000040Observation)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA:
				setObservationMedia((POCDMT000040ObservationMedia)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__ORGANIZER:
				setOrganizer((POCDMT000040Organizer)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__PROCEDURE:
				setProcedure((POCDMT000040Procedure)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST:
				setRegionOfInterest((POCDMT000040RegionOfInterest)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION:
				setSubstanceAdministration((POCDMT000040SubstanceAdministration)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__SUPPLY:
				setSupply((POCDMT000040Supply)null);
				return;
			case V3Package.POCDMT000040_COMPONENT4__CONTEXT_CONDUCTION_IND:
				unsetContextConductionInd();
				return;
			case V3Package.POCDMT000040_COMPONENT4__NULL_FLAVOR:
				setNullFlavor(NULL_FLAVOR_EDEFAULT);
				return;
			case V3Package.POCDMT000040_COMPONENT4__TYPE_CODE:
				unsetTypeCode();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case V3Package.POCDMT000040_COMPONENT4__REALM_CODE:
				return realmCode != null && !realmCode.isEmpty();
			case V3Package.POCDMT000040_COMPONENT4__TYPE_ID:
				return typeId != null;
			case V3Package.POCDMT000040_COMPONENT4__TEMPLATE_ID:
				return templateId != null && !templateId.isEmpty();
			case V3Package.POCDMT000040_COMPONENT4__SEQUENCE_NUMBER:
				return sequenceNumber != null;
			case V3Package.POCDMT000040_COMPONENT4__SEPERATABLE_IND:
				return seperatableInd != null;
			case V3Package.POCDMT000040_COMPONENT4__ACT:
				return act != null;
			case V3Package.POCDMT000040_COMPONENT4__ENCOUNTER:
				return encounter != null;
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION:
				return observation != null;
			case V3Package.POCDMT000040_COMPONENT4__OBSERVATION_MEDIA:
				return observationMedia != null;
			case V3Package.POCDMT000040_COMPONENT4__ORGANIZER:
				return organizer != null;
			case V3Package.POCDMT000040_COMPONENT4__PROCEDURE:
				return procedure != null;
			case V3Package.POCDMT000040_COMPONENT4__REGION_OF_INTEREST:
				return regionOfInterest != null;
			case V3Package.POCDMT000040_COMPONENT4__SUBSTANCE_ADMINISTRATION:
				return substanceAdministration != null;
			case V3Package.POCDMT000040_COMPONENT4__SUPPLY:
				return supply != null;
			case V3Package.POCDMT000040_COMPONENT4__CONTEXT_CONDUCTION_IND:
				return isSetContextConductionInd();
			case V3Package.POCDMT000040_COMPONENT4__NULL_FLAVOR:
				return NULL_FLAVOR_EDEFAULT == null ? nullFlavor != null : !NULL_FLAVOR_EDEFAULT.equals(nullFlavor);
			case V3Package.POCDMT000040_COMPONENT4__TYPE_CODE:
				return isSetTypeCode();
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (contextConductionInd: ");
		if (contextConductionIndESet) result.append(contextConductionInd); else result.append("<unset>");
		result.append(", nullFlavor: ");
		result.append(nullFlavor);
		result.append(", typeCode: ");
		if (typeCodeESet) result.append(typeCode); else result.append("<unset>");
		result.append(')');
		return result.toString();
	}

} //POCDMT000040Component4Impl
